<?php

namespace Admin\Builder;
use Think\View;
//use Admin\Model\AuthGroupModel;
use Admin\Controller\AdminController;

/**
 * AdminBuilder：快速建立管理页面。
 *
 * Class AdminBuilder
 * @package Admin\Builder
 */
abstract class AdminBuilder extends AdminController {
    public function display($templateFile='',$charset='',$contentType='',$content='',$prefix='') {
        //获取模版的名称
        //$template ='Builder/'.$templateFile;

        //显示页面
        parent::display(T('Admin@Builder/'.$templateFile));
    }

    protected function compileHtmlAttr($attr) {
        $result = array();
        foreach($attr as $key=>$value) {
            $value = htmlspecialchars($value);
            $result[] = "$key=\"$value\"";
        }
        $result = implode(' ', $result);
        return $result;
    }
}

